# Copyright 2019 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# NOTE: This file is auto generated by the elixir code generator program.
# Do not edit this file manually.

defmodule GoogleApi.Storage.V1.Model.ManagedFolder do
  @moduledoc """
  A managed folder.

  ## Attributes

  *   `bucket` (*type:* `String.t`, *default:* `nil`) - The name of the bucket containing this managed folder.
  *   `createTime` (*type:* `DateTime.t`, *default:* `nil`) - The creation time of the managed folder in RFC 3339 format.
  *   `id` (*type:* `String.t`, *default:* `nil`) - The ID of the managed folder, including the bucket name and managed folder name.
  *   `kind` (*type:* `String.t`, *default:* `storage#managedFolder`) - The kind of item this is. For managed folders, this is always storage#managedFolder.
  *   `metageneration` (*type:* `String.t`, *default:* `nil`) - The version of the metadata for this managed folder. Used for preconditions and for detecting changes in metadata.
  *   `name` (*type:* `String.t`, *default:* `nil`) - The name of the managed folder. Required if not specified by URL parameter.
  *   `selfLink` (*type:* `String.t`, *default:* `nil`) - The link to this managed folder.
  *   `updateTime` (*type:* `DateTime.t`, *default:* `nil`) - The last update time of the managed folder metadata in RFC 3339 format.
  """

  use GoogleApi.Gax.ModelBase

  @type t :: %__MODULE__{
          :bucket => String.t() | nil,
          :createTime => DateTime.t() | nil,
          :id => String.t() | nil,
          :kind => String.t() | nil,
          :metageneration => String.t() | nil,
          :name => String.t() | nil,
          :selfLink => String.t() | nil,
          :updateTime => DateTime.t() | nil
        }

  field(:bucket)
  field(:createTime, as: DateTime)
  field(:id)
  field(:kind)
  field(:metageneration)
  field(:name)
  field(:selfLink)
  field(:updateTime, as: DateTime)
end

defimpl Poison.Decoder, for: GoogleApi.Storage.V1.Model.ManagedFolder do
  def decode(value, options) do
    GoogleApi.Storage.V1.Model.ManagedFolder.decode(value, options)
  end
end

defimpl Poison.Encoder, for: GoogleApi.Storage.V1.Model.ManagedFolder do
  def encode(value, options) do
    GoogleApi.Gax.ModelBase.encode(value, options)
  end
end
